package com.library.book.controller;

import com.library.book.po.BorrowingBooksPo;
import com.library.book.service.BorrowingBooksRecordService;
import com.library.book.utils.Page;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.Resource;


    @Controller
    public class BorrowingController {

        @Resource
        private BorrowingBooksRecordService borrowingBooksRecordService;


        @RequestMapping("/allBorrowBooksRecordPage")
        public String allBorrowingBooksRecordPage(Model model, @RequestParam("pageNum") int pageNum) {
            Page<BorrowingBooksPo> page = borrowingBooksRecordService.selectAllByPage(pageNum);
            model.addAttribute("page", page);
            return "admin/allBorrowingBooksRecord";

        }
    }

